<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/6/3
 * Time: 17:39
 */
namespace SwoCloud\Helper;

class Arithmetic
{
    protected static $roundLastIndex = 0;

    public static function hash()
    {

    }

    public static function round(array $list)
    {
        $index = self::$roundLastIndex;
        $url = $list[$index];
        if ($index + 1 > count($list) - 1) {
            self::$roundLastIndex = 0;
        } else {
            self::$roundLastIndex++;
        }
        return $url;

    }
}